package corej.exam.com.usermgmt;

import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.util.HashSet;
import java.util.Set;

public class UserClient {

    public static void main(String[] args) throws Exception {
        // 1.��bsocket,
        Socket cs = new Socket("localhost", 9000);
        // 2.����������
        OutputStream os = cs.getOutputStream();
        ObjectOutputStream objOs = new ObjectOutputStream(os);

        FileAnalyzer fileAnalyzer = new FileAnalyzer("E:\\workspace\\exam");

        Set userSet = (HashSet) fileAnalyzer.readUser();
        objOs.writeObject(userSet);

        // Set groupSet = (HashSet)fileAnalyzer.readGroup();
        // objOs.writeObject(groupSet);

        // 3.�ر���
        objOs.close();
        System.out.println("objOs.close()");
    }

}
